package com.zjsd.sqeybusiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsd.sqeybusiness.mapper.PrivacyPolicyMapper;
import com.zjsd.sqeybusiness.domain.PrivacyPolicy;
import com.zjsd.sqeybusiness.service.IPrivacyPolicyService;

/**
 * 精品汇隐私条款Service业务层处理
 *
 * @author Zheng
 * @date 2020-11-05
 */
@Service
public class PrivacyPolicyServiceImpl implements IPrivacyPolicyService
{
    @Autowired
    private PrivacyPolicyMapper privacyPolicyMapper;

    /**
     * 查询精品汇隐私条款
     *
     * @param id 精品汇隐私条款ID
     * @return 精品汇隐私条款
     */
    @Override
    public PrivacyPolicy selectPrivacyPolicyById(Integer id)
    {
        return privacyPolicyMapper.selectPrivacyPolicyById(id);
    }

    /**
     * 查询精品汇隐私条款列表
     *
     * @param privacyPolicy 精品汇隐私条款
     * @return 精品汇隐私条款
     */
    @Override
    public List<PrivacyPolicy> selectPrivacyPolicyList(PrivacyPolicy privacyPolicy)
    {
        return privacyPolicyMapper.selectPrivacyPolicyList(privacyPolicy);
    }

    /**
     * 新增精品汇隐私条款
     *
     * @param privacyPolicy 精品汇隐私条款
     * @return 结果
     */
    @Override
    public int insertPrivacyPolicy(PrivacyPolicy privacyPolicy)
    {
        return privacyPolicyMapper.insertPrivacyPolicy(privacyPolicy);
    }

    /**
     * 修改精品汇隐私条款
     *
     * @param privacyPolicy 精品汇隐私条款
     * @return 结果
     */
    @Override
    public int updatePrivacyPolicy(PrivacyPolicy privacyPolicy)
    {
        return privacyPolicyMapper.updatePrivacyPolicy(privacyPolicy);
    }

    /**
     * 批量删除精品汇隐私条款
     *
     * @param ids 需要删除的精品汇隐私条款ID
     * @return 结果
     */
    @Override
    public int deletePrivacyPolicyByIds(Integer[] ids)
    {
        return privacyPolicyMapper.deletePrivacyPolicyByIds(ids);
    }

    /**
     * 删除精品汇隐私条款信息
     *
     * @param id 精品汇隐私条款ID
     * @return 结果
     */
    @Override
    public int deletePrivacyPolicyById(Integer id)
    {
        return privacyPolicyMapper.deletePrivacyPolicyById(id);
    }
}
